package study.reactive.springboot.webflux.service;

import cn.hutool.core.thread.ThreadUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import study.eggs.result.Result;
import study.eggs.result.Results;

@Slf4j
@Service
public class EchoService {

    public Result echo(String name, Long sleep) {
        log.info("[echo] start: {}", name);
        ThreadUtil.sleep(sleep);
        log.info("[echo]   end: {}", name);
        return Results.ok();
    }
}
